# -*-coding:utf-8-*-
'''
File Create by Author:Backpackerxl
Create File Time:2021/10/13/013 20:59
Program IDE:PyCharm
File Name:MangerController.py
  
'''
from service.MangerService import MangerService as manger


class MangerController:

    def login(self, user, passwd):
        res = manger.login(self, user)
        info = []
        if res == None:
            info.append(False)
            info.append("管理员账号输入错误...")
        else:
            if res.get_u_passwd() == passwd:
                info.append(True)
                info.append("操作成功，请稍后...")
            else:
                info.append(False)
                info.append("输入密码有误...")
        return info
